<?php

use Biz\Constants\Site\SiteIntroductionConstants;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

/**
 * SiteIntroduction.
 *
 * @license [http://www.85do.com] [杭州永奥网络科技有限公司]
 * @copyright Copyright (c) 2018-2026 Hangzhou Yongao Technology Co., Ltd. All rights reserved.
 */
class SiteIntroduction extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('site_introduction', function (Blueprint $table) {
            $table->bigIncrements('id');//BigID unsigned
            $table->bigInteger('site_id')->unsigned();//所属站点ID
            $table->unsignedBigInteger('sort')->default(0);//排序
            $table->tinyInteger('status')->default(SiteIntroductionConstants::STATUS_NORMAL);//站点状态
            
            // 注意时间戳位数
            $table->timestamps();
            $table->softDeletes();

            // index
            $table->index('site_id');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('site_introduction');
    }
}